package butines.game.lastcolony.screen;

import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics2D;

import butines.core.GameImage;
import butines.core.gui.GUIImage;
import butines.core.gui.GUILabel;
import butines.core.gui.style.Text;
import butines.core.gui.style.TextShadow;
import butines.game.lastcolony.GameCanvas;
import butines.game.lastcolony.LastColony;

public class GameInterfaceScreen extends AbstractScreen {
	
	private GameImage mainInterface;
	private GUILabel gameMessages;
	private GUILabel cash;
	private GUIImage callerPicture;
	private GameCanvas gameCanvas;
	
	public GameInterfaceScreen(LastColony lastColony) {
		super(lastColony);
		loadImage();
		createGui();
	}
	
	public void loadImage() {
	    mainInterface = new GameImage("images/maininterface.png");
	}
	
	private void createGui() {
	    
	    Text text = new Text(new Font("Courier New", Font.PLAIN, 13));
	    text.setColor(new Color(130, 150, 162));
	    
	    TextShadow textShadow = new TextShadow();
	    textShadow.setText(text.copy());
	    textShadow.getText().setColor(Color.BLACK);
	    textShadow.add(1, 1);
	    
	    gameMessages = new GUILabel(15, 5, "");
	    gameMessages.setText(text);
        
        cash = new GUILabel(498, 256, "");
        cash.setText(text);
        
        callerPicture = new GUIImage(498, 154);
	    
        gameCanvas = new GameCanvas(0, 79, lastColony);
        
        painel.add(gameCanvas);
	    painel.add(gameMessages);
        painel.add(cash);
        painel.add(callerPicture);
	}
	
	
	public void init() {
        
	}
	
	public void destroy() {
	}
	
	@Override
	public void update(float tpf) {

	}
	
	@Override
	public void render(Graphics2D g2d) {
	    mainInterface.draw(g2d, 0, 0);
	}
	
}
